package com.tokenplus.thai.utils.analytics.util

import android.app.Application
//import com.tokenplus.thai.ProjectConfig
//import com.tokenplus.thai.extend.toCombineUrlPath
//import com.tokenplus.thai.anetwork.ApiUrl
//import com.tokenplus.thai.utils.UserStateUtil
//import com.zhi.syc.data.ASBuilder
//import com.zhi.syc.data.ASSycManager
//import com.zhi.syc.point.ASPointBuilder
//import com.zhi.syc.point.ASPointSycManager
//import java.util.*

object SycDeviceUtil {

    /**
     * 初始化设备信息模块
     *
     * @param context Application
     */
    fun init(context: Application) {
//        try {
//            ASBuilder.setMock(false)
//            ASBuilder.setLog(false)
//            ASBuilder.setServerHost(ApiUrl.BASE_URL)
//            ASBuilder.setPathApplist(ApiUrl.GARLICLOAN_PATH_APPLIST.toCombineUrlPath())
//            ASBuilder.setPathContactResult(ApiUrl.GARLICLOAN_PATH_CONTACT_RESULT.toCombineUrlPath())
//            ASBuilder.setPathContact(ApiUrl.GARLICLOAN_PATH_CONTACT.toCombineUrlPath())
//            ASBuilder.setPathMessage(ApiUrl.GARLICLOAN_PATH_MESSAGE.toCombineUrlPath())
//            ASBuilder.setPathDevice(ApiUrl.GARLICLOAN_PATH_DEVICE.toCombineUrlPath())
//            ASBuilder.setPathImage(ApiUrl.GARLICLOAN_PATH_IMAGE.toCombineUrlPath())
//            ASBuilder.setPathBattery(ApiUrl.GARLICLOAN_PATH_BATTERY.toCombineUrlPath())
//            ASBuilder.setPathHardware(ApiUrl.GARLICLOAN_PATH_HARDWARE.toCombineUrlPath())
//            ASBuilder.setPathStore(ApiUrl.GARLICLOAN_PATH_STORE.toCombineUrlPath())
//            ASBuilder.setPathMedia(ApiUrl.GARLICLOAN_PATH_MEDIA.toCombineUrlPath())
//            ASBuilder.setPathNetwork(ApiUrl.GARLICLOAN_PATH_NETWORK.toCombineUrlPath())
//            ASBuilder.setPathLocation(ApiUrl.GARLICLOAN_PATH_LOCATION.toCombineUrlPath())
//            ASBuilder.setPathCalendar(ApiUrl.GARLICLOAN_PATH_CALENDAR.toCombineUrlPath())
//            ASBuilder.setPathScanFilePath(ApiUrl.GARLICLOAN_PATH_WHATSAPP_DIR.toCombineUrlPath())
//            ASBuilder.setPathSettingAccount(ApiUrl.GARLICLOAN_PATH_SETTING_ACCOUNT.toCombineUrlPath())
//            ASBuilder.setPathAduid(ApiUrl.GARLICLOAN_PATH_ADUID.toCombineUrlPath())
//            ASBuilder.setAppid(ProjectConfig.GARLICLOAN_Product)
//            ASBuilder.setKeyProduct(ProjectConfig.GARLICLOAN_Product)
//            ASSycManager.getInstance().init(context)
//
//            ASPointBuilder.URL_SERVER_HOST = ApiUrl.BASE_URL
//            ASPointBuilder.PATH_POINT_RECORD =
//                ApiUrl.GARLICLOAN_PATH_POINT_RECORD.toCombineUrlPath()
//            ASPointBuilder.KEY_PRODUCT = ProjectConfig.GARLICLOAN_Product
//            ASPointBuilder.KEY_APPID = ProjectConfig.GARLICLOAN_Product
//            ASPointBuilder.KEY_VERSION = ProjectConfig.GARLICLOAN_Version.toString()
//            ASPointSycManager.getInstance().init(context)
//
//        } catch (e: Exception) {
//            e.printStackTrace()
//        }
    }

    /**
     * 保存设备 s2s信息
     */
    fun saveS2SInfo() {
//        try {
//            if (UserStateUtil.isDidLogin()) {
//                val permissions = ArrayList<String>()
//                permissions.add(android.Manifest.permission.READ_PHONE_STATE)
//                permissions.add(android.Manifest.permission.READ_SMS)
//                permissions.add(android.Manifest.permission.READ_CONTACTS)
//                ASSycManager.getInstance()
//                    .sycDataByPermissions(UserStateUtil.mToken, permissions, true)
//            }
//        } catch (e: Exception) {
//            e.printStackTrace()
//        }
    }
}